package com.wcgksoft.controller.display;


import com.wcgksoft.entity.display.Monitoringdata;
import com.wcgksoft.service.display.MonitoringdataService;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping(value = "monitoringdispay")
public class MonitoringdisplayController {


    @Autowired
    private MonitoringdataService monitoringdataService;


    @RequestMapping("/list")
    public String ret(ModelMap modelMap){
        DetachedCriteria criteria = DetachedCriteria.forClass(Monitoringdata.class);
        List<Monitoringdata> byConditions = monitoringdataService.findByConditions(criteria);
        modelMap.put("mlist", byConditions);
        return "monitoringdisplay/list";
    }
}
